<?php
	
	class model_yahoo
	{	
		var $yahoo;
		var $ten;
		
		function Convert($row)
		{
			$object = new model_yahoo();			
			$object->yahoo=$row["Yahoo"];
			$object->ten=$row["TenNguoiLienHe"];		
			return $object;		
		}
		
		function getAll()
		{
			$qr= "select * from lienhe";
			$qr=query($qr);
			
			$arr = array();			
			$i=0;			
			while($row=mysql_fetch_array($qr))
			{
				$arr[$i]=self::Convert($row);
				$i++;
			}
			return $arr;
		}
		
		
	}
?>